package cn.cs.client;

import cn.cs.common.Dto;
import cn.cs.config.CsConfiguration;
import cn.cs.fallback.ExpensesExplainFallBack;
import cn.cs.fallback.RepairBbsFallBack;
import cn.cs.pojo.RepairBbsType;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * Created by yuexl
 */
@FeignClient(name = "cs-user-provider", configuration = CsConfiguration.class, fallback = RepairBbsFallBack.class)
public interface RepairBbsClient {


    @RequestMapping(value = "/getRepairBbsCountByMap", method = RequestMethod.POST)
    public Integer  getRepairBbsCountByMap(@RequestBody Map<String, Object> param)throws Exception;

    @RequestMapping(value = "/getRepairBbsListByMap", method = RequestMethod.POST)
    public List<Map<String, Object>>  getRepairBbsListByMap(@RequestBody Map<String, Object> param)throws Exception;

    @RequestMapping(value = "/getBbsImages", method = RequestMethod.POST)
    public List<Map<String,Object>> getBbsImages(@RequestParam("id") String id);

    @RequestMapping(value = "/getReplyTree", method = RequestMethod.POST)
    public List<Map<String,Object>> getReplyTree(@RequestParam("id") String id);

    @RequestMapping(value = "/insertBbsByMap", method = RequestMethod.POST)
    public Integer  insertBbsByMap(@RequestBody Map<String, Object> param)throws Exception;

    @RequestMapping(value = "/insertBbsImg", method = RequestMethod.POST)
    public Integer  insertBbsImg(@RequestBody Map<String, Object> param)throws Exception;

    @RequestMapping(value = "/getBbsById", method = RequestMethod.POST)
    public Map<String,Object> getBbsById(@RequestParam("id") String id);

    @RequestMapping(value = "/getReplyById", method = RequestMethod.POST)
    public Map<String,Object> getReplyById(@RequestParam("id") String id);

    @RequestMapping(value = "/updateBbs", method = RequestMethod.POST)
    public Integer  updateBbs(@RequestBody Map<String, Object> param)throws Exception;

    @RequestMapping(value = "/insertReply", method = RequestMethod.POST)
    public Integer  insertReply(@RequestBody Map<String, Object> param)throws Exception;

    @RequestMapping(value = "/updateBBSRecommend", method = RequestMethod.POST)
    public Integer  updateBBSRecommend(@RequestBody Map<String, Object> param)throws Exception;


}

